import React from 'react';
import Link from 'umi/link';
import styles from './SiderMenu.css';
import IconFont from '../IconFont/index';
import { Layout, Menu, Icon } from 'antd';
const { Sider } = Layout;

export default class SiderMenu extends React.Component {
  state = {
    collapsed: false,
  };

  toggle = () => {
    this.setState({
      collapsed: !this.state.collapsed,
    });
  }

  render() {
    return (
        <Sider
          trigger={null}
          collapsible
          collapsed={this.state.collapsed}
          className={styles.siderContaner}
        >
          <div className={styles.logo} key="logo">
            <Link to="/">
              <img src='http://www.fangline.cn/css/web/w-new-logo.png' alt="logo" />
              <h1>fangline</h1>
            </Link>
          </div>
          <Menu theme="dark" mode="inline" defaultSelectedKeys={['1']}>
            <Menu.Item key="1">
              <IconFont type="icon-house" style={{ fontSize: '16px', color: 'lightblue' }} />
              <span>房源</span>
            </Menu.Item>
          </Menu>
        </Sider>
    );
  }
}
